home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Leser 19
/
Amiga Plus Leser CD 19.iso
/
Online
/
AmigaTalk
/
intuition
/
BOOPSIComms.st
< prev
next >
Wrap
Text File
|
2002-05-20
|
2KB
|
51 lines
" -------------------------------------------------------------------- "
" ICClass Class is a Singleton class that allows the user to "
" reference BOOPSI inter-communication class tags' hexadecimal values. "
""
" The User does NOT need to create one of these, since Intuition Class "
" will instantiate the only needed instance of this Class. See the "
" SetupIntuition.st source file for the method(s) that help the User "
" with this Class. "
""
" EXAMPLE: 'myTag <- intuition getICClass: #ICA_MAP' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class ICClass :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
"ICM_ Tags take no parameters:"
self at: #ICM_Dummy put: 16r401.
self at: #ICM_SETLOOP put: 16r402.
self at: #ICM_CLEARLOOP put: 16r403.
self at: #ICM_CHECKLOOP put: 16r404.
self at: #ICA_Dummy put: 16r80040000.
self at: #ICA_TARGET put: 16r80040001.
self at: #ICA_MAP put: 16r80040002.
self at: #ICSPECIAL_CODE put: 16r80040003.
self at: #ICTARGET_IDCMP put: 16rFFFFFFFF.
].
^ self "or ^ uniqueInstance??"
]